<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateValueAddedTaxInvoiceQualificationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('value_added_tax_invoice_qualifications', function (Blueprint $table) {
            $table->integer('member_id')->unsigned()->comment('增值税发票资质表，对应的用户 ID（目前仅针对采购商）');
            $table->primary('member_id');

            $table->string('company_name')->comment('单位名称');
            $table->string('code')->comment('纳税人识别码');
            $table->string('address')->comment('注册地址');
            $table->string('phone')->comment('注册联系电话');
            $table->string('bank')->comment('开户银行');
            $table->string('bank_account')->comment('银行账户');

            $table->string('bill_to_name')->comment('收票人姓名');
            $table->string('bill_to_address')->comment('收票人地址');
            $table->string('bill_to_phone')->comment('收票人联系电话');
            $table->string('bill_to_province')->comment('收票人省份');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('value_added_tax_invoice_qualifications');
    }
}
